<?php
/**
 * Created by JetBrains PhpStorm.
 * User: GMC02
 * Date: 10/10/13
 * Time: 1:59 PM
 * To change this template use File | Settings | File Templates.
 */
return array(
    'urlFormat' => 'path',
    'showScriptName' => false,
    'rules' =>
        array(
            '/backend/' => '/backend.php/site/index',

            'category/<cat_id:\d+>/<cat_name:[\w-]+>/' => 'category/index',
            'category/<cat_id:\d+>/<cat_name:[\w-]+>/<location:\d+>/<location_name:[\w-]+>' => 'category/index',

            'user/<user_id:\d+>/<user_name:[\w-]+>/' => 'raovatUserInfo/index',
            'user/login' => 'raovatUserInfo/login',
            'user/logout' => 'raovatUserInfo/logout',
            'user/register' => 'raovatUserInfo/register',

            'change/<theme:[\w-]+>/' => 'site/changeTheme',
            'search/<cat_id:\d+>/<keyword:.*?>' => 'category/search',

            'app/<app:[\w-]+>' => 'site/index',

            'user/<user_id:\d+>/thong-tin-thanh-toan' => 'raovatUserInfo/editBuyWay',
            'user/active/<code:.*?>' => 'raovatUserInfo/activeAccount',

            'product/<product_id:\d+>/<product_name:.*?>.html/' => 'product/index',
            'product/update/<product_id:\d+>/<product_name:[\w-]+>' => 'product/update',
            'product/active/<code:.*?>' => 'product/active',
            'product/moi-nhat/<location:\d+>/<name:.*?>' => 'product/latest',
            'product/moi-nhat/' => 'product/latest',

            'co-the-ban-quan-tam/<cat_id:\d+>/<cat_name:[\w-]+>/<location:\d+>/<location_name:[\w-]+>' => 'userInterested/category',
            'co-the-ban-quan-tam/<cat_id:\d+>/<cat_name:.*?>' => 'userInterested/category',
            'co-the-ban-quan-tam' => 'userInterested/index',

            'sitemap.xml' => 'site/sitemapxml',

            //region Base Routes
            '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            //endregion
        )
);
